
<form action="<?php echo url_for('@baner_edit_save') ?>" method="post" enctype="multipart/form-data" autocomplete="off">
    <input type="hidden" name="id" value="<?php echo $baner->getId(); ?>" />
<h1>Editar publicación </h1>
<table width="100%" cellpadding="5" cellspacing="5">
  <tr>
    <td>T&iacute;tulo</td>
    <td><textarea name="titulo"><?php echo $baner->getTitulo(); ?></textarea></td>
  </tr>



  <tr>
    <td>Imagen de la portada</td>
    <td>
        <?php $DS = DIRECTORY_SEPARATOR; ?>
        <?php if(file_exists(sfConfig::get('sf_upload_dir').$DS."baner".$DS.$baner->getId().".jpg")){ ?>
            <?php echo image_tag('/uploads/baner/'.$baner->getId().'.jpg','size=245x306') ?>
            <br />
        <?php } ?>
        <input type="file" name="image" />
    </td>
    <td><em style="color: gray;">La imagen debe ser: 245x306 JPG</em></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" value="Guardar Cambios"/>
    </td>
  </tr>
</table>
</form>